﻿# Exchange Piety
shogunate_exchange_piety_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
	decision_group_type = shogunate_minor

	desc = shogunate_exchange_piety_decision_desc
	selection_tooltip = shogunate_exchange_piety_decision_tooltip

	ai_check_interval = 0

	is_shown = {
		is_ruler = yes
		faith.religion = religion:shinto_religion
	}

	is_valid_showing_failures_only = {
		is_available_adult = yes
		piety >= 0
	}

	cooldown = { years = 10 }

	widget = {
		gui = "decision_view_widget_option_list_generic"
		controller = decision_option_list_controller
		decision_to_second_step_button = "shogunate_exchange_piety_decision_second_step"
		show_from_start = yes

		# Seize Manor
		item = {
			value = shogunate_exchange_piety_decision_seize_manor
			localization = shogunate_exchange_piety_decision_seize_manor
			icon = "gfx/interface/icons/icon_prowess.dds"
			is_valid = {
				NOT = { has_trait = zealous }
			}
			ai_chance = {
				value = 0
			}
		}
		# Build Temple
		item = {
			value = shogunate_exchange_piety_decision_build_temple
			localization = shogunate_exchange_piety_decision_build_temple
			icon = "gfx/interface/icons/message_feed/building.dds"
			is_valid = {
				NOT = { has_trait = cynical }
			}
			ai_chance = {
				value = 0
			}
		}
		# Mobilize Follower
		item = {
			value = shogunate_exchange_piety_decision_mobilize_follower
			localization = shogunate_exchange_piety_decision_mobilize_follower
			icon = "gfx/interface/icons/message_feed/mercenary.dds"
			is_valid = {
				always = yes
			}
			ai_chance = {
				value = 0
			}
		}
		# Pray
		item = {
			value = shogunate_exchange_piety_decision_pray
			localization = shogunate_exchange_piety_decision_pray
			icon = "gfx/interface/icons/message_feed/religious.dds"
			is_valid = {
				NOT = { has_trait = cynical }
			}
			ai_chance = {
				value = 0
			}
		}
		# Curse
		item = {
			value = shogunate_exchange_piety_decision_curse
			localization = shogunate_exchange_piety_decision_curse
			icon = "gfx/interface/icons/message_feed/intrigue.dds"
			is_valid = {
				NOT = { has_trait = zealous }
			}
			ai_chance = {
				value = 0
			}
		}
		# Enlightenment
		item = {
			value = shogunate_exchange_piety_decision_enlightenment
			localization = shogunate_exchange_piety_decision_enlightenment
			icon = "gfx/interface/icons/message_feed/task_conversion.dds"
			is_valid = {
				always = yes
			}
			ai_chance = {
				value = 0
			}
		}
	}

	effect = {
		if = {
			limit = { scope:shogunate_exchange_piety_decision_seize_manor = yes }
			add_character_modifier = {
				modifier = shogunate_seize_manor_modifier
				years = 1
			}
		}
		if = {
			limit = { scope:shogunate_exchange_piety_decision_build_temple = yes }
			add_character_modifier = {
				modifier = shogunate_build_temple_modifier
				years = 1
			}
		}
		if = {
			limit = { scope:shogunate_exchange_piety_decision_mobilize_follower = yes }
			add_character_modifier = {
				modifier = shogunate_mobilize_follower_modifier
				years = 1
			}
		}
		if = {
			limit = { scope:shogunate_exchange_piety_decision_pray = yes }
			add_character_modifier = {
				modifier = shogunate_pray_modifier
				years = 1
			}
		}
		if = {
			limit = { scope:shogunate_exchange_piety_decision_curse = yes }
			add_character_modifier = {
				modifier = shogunate_curse_modifier
				years = 1
			}
		}
		if = {
			limit = { scope:shogunate_exchange_piety_decision_enlightenment = yes }
			add_character_modifier = {
				modifier = shogunate_enlightenment_modifier
				years = 1
			}
		}
	}

	cost = {
		piety = {
			value = major_piety_value
		}
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}
